# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2022年01月13日
"""
import requests
from lxml import etree
import os
import time
import re

if not os.path.exists('./财务资料'):
	os.mkdir('./财务资料')

url = "https://www.jkl.com.cn/newsList.aspx?TypeId=10009"
headers = {"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36"}
params = {
	"current": 1,
	"TypeId": "10009"
}
响应数据= requests.get(url=url,headers=headers,params=params).text
解析 = etree.HTML(响应数据)
尾页=解析.xpath('//a[text()="尾页"]/@href')
if 尾页 !=[]:
	正则=re.search("current=(\d+)",尾页[0])
	页数=正则.group(1)
else:
	页数=1
print(页数)




